If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{   
	Start-Process powershell -Verb runAs -ArgumentList $myinvocation.mycommand.definition, $(Get-Location) 
	Break
}
$runPath = $args -replace '\\','\\'
echo $runPath
$info = @"
{"WorkingDirectory":null,"ConfigurationPath":"$runPath\\XIVLauncher\\dalamudConfig.json","PluginDirectory":"$runPath\\XIVLauncher\\installedPlugins","DefaultPluginDirectory":"$runPath\\XIVLauncher\\devPlugins","Language":4,"GameVersion":"2020.07.16.0000.0000"}
"@
echo $info
$bytes = [System.Text.Encoding]::UTF8.GetBytes($info)
$encodedInfo =[Convert]::ToBase64String($bytes)
$Command = "$args\Dalamud.Injector.exe"
$Parms = "-1 $encodedInfo"
$Prms = $Parms.Split(" ")
Start-Process "$Command" $Prms -WorkingDirectory "$runPath"
echo $Command
echo $Prms
pause